-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Improve messages in server:update command #1022
Conversation
Skipping CI for Draft Pull Request. |
8e96983
to
23f0bd4
Compare
23f0bd4
to
4ec3b94
Compare
/retest |
cli.warn(`It is not possible to update Eclipse Che to a newer version | ||
using the current '${currentChectlVersion}' version of chectl. Please, update 'chectl' | ||
to a newer version '${latestChectlVersion}' with the command 'chectl update ${chectlChannel}' | ||
and then try again.`) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe move into a function with args that returns the message? Then block below will not be duplicated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is slightly different.
} | ||
|
||
if (!flags.yes && !await cli.confirm('If you want to continue - press Y')) { | ||
this.exit(0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it would be nice to print something into output, like Update cancelled by user
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree
src/commands/server/update.ts
Outdated
if (projectName === 'chectl' && latestChectlVersion) { | ||
// suggest update chectl first |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if latestChectlVersion
together with suggest update chectl first
is very confusing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, it should be !!latestChectlVersion
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But then we have
ERROR: 141:41 no-extra-boolean-cast redundant double negation in an if statement condition
so return to
if (projectName === 'chectl' && latestChectlVersion) {
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My point is that we have:
if (latestChectlVersion) {
// suggest update chectl first
...
}
which confuses me a lot
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: mmorhun, tolusha The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Signed-off-by: Anatolii Bazko <abazko@redhat.com>
New changes are detected. LGTM label has been removed. |
/retest |
Signed-off-by: Anatolii Bazko abazko@redhat.com
What does this PR do?
Improve messages in server:update command
Screenshot/screencast of this PR
What issues does this PR fix or reference?
eclipse-che/che#18514
How to test this PR?
PR Checklist
As the author of this Pull Request I made sure that:
What issues does this PR fix or reference
andHow to test this PR
completedReviewers
Reviewers, please comment how you tested the PR when approving it.